public class NGuessNumber {
    int [] answers=new int[4];

    public int [] generateAnswers(){
        answers[0]= (int) (Math.random()*10);
        answers[1]= (int) (Math.random()*10);
        answers[2]= (int) (Math.random()*10);
        answers[3]= (int) (Math.random()*10);
        return answers;
    }

    public static void main(String[] args) {
        NGuessNumber ngn=new NGuessNumber();
        int[] answers = ngn.generateAnswers();
        for (int i = 0; i < answers.length; i++) {
            System.out.println(answers[i]);
        }
    }
}